<template>
	<el-drawer title="奖惩记录详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="排序号" prop="sortNo">{{form.sortNo}}
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="关联人员" prop="userId">{{form.userName}}
						</el-form-item>
					</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="绩效类型" prop="incentiveType">{{form.incentiveTypeName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="处理事项" prop="incentiveItem">{{form.incentiveItemName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="处理日期" prop="incentiveTime">{{form.incentiveTime}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="绩效金额" prop="incentiveAmount">{{form.incentiveAmount}}/元
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="备注说明">{{ form.remark }}
					</el-form-item>
					<el-form-item label="证照附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true"></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'

export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				recordId: '',
				userName: '',
				sortNo: '',
				incentiveTypeName: '',
				incentiveItemName: '',
				incentiveTime: '',
				incentiveAmount: "",
				attachId: '',
				remark: ''
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model) {
			this.model = model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data) {
			this.form.recordId = data.recordId
			this.form.userName = data.userName
			this.form.sortNo = data.sortNo
			this.form.incentiveTypeName = data.incentiveTypeName
			this.form.incentiveItemName = data.incentiveItemName
			this.form.incentiveTime = data.incentiveTime
			this.form.incentiveAmount = data.incentiveAmount
			this.form.attachId = data.attachId
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
